<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Welcome to Tornado</title>
</head>
<body>
  <button onclick="sendMessage('start-baku')">startBaku</button>
  <button onclick="sendMessage('stop-baku')">stopBaku</button>
  <button onclick="sendMessage('debug')">debug</button>
  <h1>Hello, {{ user['name'] }}!</h1>
  <p>Your age is: {{ user['age'] }}</p>
  {% for log in logs %}
    <li>{{ log.content }} {{log.created_at}} (223 years old)</li>
  {% end %}
  <script>
    var ws = new WebSocket('wss://wonew-wss.frp.wonew.top/websocket');
    function sendMessage(message) {
      ws.send(message)
    }
    
  </script>
</body>
</html>